package com.ashen.boot.admin.configuration.datascope;

import org.springframework.core.MethodParameter;
import org.springframework.lang.Nullable;
import org.springframework.web.bind.support.WebDataBinderFactory;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.method.support.ModelAndViewContainer;

public interface HandlerMethodArgumentResolver {
    /**
     * 功能描述: 判断是否支持 MethodParameter
     * 〈〉
     * @Param:
     * @Return:
     * @Author: Steven
     * @Date: 2020/12/15 11:47
     */
    boolean supportsParameter(MethodParameter parameter);
    /**
     * 功能描述: 用于数据绑定解析请求参数
     * 〈〉
     * @Param:
     * @Return:
     * @Author: Steven
     * @Date: 2020/12/15 11:47
     */
    Object resolveArgument(MethodParameter parameter, @Nullable ModelAndViewContainer mavContainer, NativeWebRequest webRequest, @Nullable WebDataBinderFactory binderFactory) throws Exception;
}
